<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.0/react.min.js"></script>
		<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.0/react-dom.min.js"></script>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
	</head>
	<body>
		<div id="container"></div>
		
		<!--react框架在render方法内，能自动遍历数组里面的所有东西-->
		<!--<script type="text/babel">
			var arr = [<h1>hi</h1>,<h5>hello</h5>];
			ReactDOM.render(
				<div>{arr}</div>,
				document.getElementById('container')
			);
		</script>-->
		
		<!--下面的因为我要hello后面每次都跟不同东西，所以需要循环所有东西三次-->
		<script type="text/babel">
			var names = ['T','Tom','A'];
			ReactDOM.render(
				<div>
					{
						names.map(function(names){
								return <div>Hello {names}!</div>
						})
					}
				</div>,
				document.getElementById('container')
			);
		</script>
	</body>
</html>
